plugins {
	id 'kotlin'
	id 'io.spring.antora.generate-antora-yml' version '0.0.1'
	id 'org.antora' version '1.0.0'
}

description = "Spring Framework Docs"

apply from: "${rootDir}/gradle/ide.gradle"
apply from: "${rootDir}/gradle/publications.gradle"

antora {
	options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]
	environment = [
			'BUILD_REFNAME': 'HEAD',
			'BUILD_VERSION': project.version,
	]
}

tasks.named("generateAntoraYml") {
	asciidocAttributes = project.provider( {
		return  ["spring-version": project.version ]
	} )
}

tasks.register("generateAntoraResources") {
	dependsOn 'generateAntoraYml'
}

jar {
	enabled = false
}

javadoc {
	enabled = false
}

repositories {
	maven {
		url "https://repo.spring.io/release"
	}
}

dependencies {
	api(project(":spring-context"))
	api(project(":spring-jdbc"))
	api(project(":spring-jms"))
	api(project(":spring-web"))
	api(project(":spring-webmvc"))
	api(project(":spring-context-support"))
	api(project(":spring-aspects"))
	api(project(":spring-test"))
	api(project(":spring-websocket"))

	api("org.jetbrains.kotlin:kotlin-stdlib")
	api("jakarta.jms:jakarta.jms-api")
	api("jakarta.servlet:jakarta.servlet-api")
	api("org.apache.commons:commons-dbcp2:2.11.0")
	api("com.mchange:c3p0:0.9.5.5")
	api("com.fasterxml.jackson.core:jackson-databind")
	api("com.fasterxml.jackson.module:jackson-module-parameter-names")
	api("jakarta.validation:jakarta.validation-api")
	api("org.aspectj:aspectjweaver")
	api("io.projectreactor.netty:reactor-netty-http")
	api("org.eclipse.jetty.websocket:jetty-websocket-jetty-api")
	api("javax.cache:cache-api")
	api("jakarta.resource:jakarta.resource-api")
	api("org.apache.activemq:activemq-ra:6.1.2")

	implementation(project(":spring-core-test"))
	implementation("org.assertj:assertj-core")
}
